package com.smrtcold.dev.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UtilMapper {

    //------------------------------------------------吸气压力对照表---------------------------------------------------------
    public Double getTempByPressure(@Param("type") String type, @Param("pressure") Double pressure);

    public Double getPressureByTemp(@Param("type") String type, @Param("temp") Double temp);


    @Insert("INSERT INTO `360_pm_conf`(`mid`,`key`,`mapping`)values(#{mid},#{key},#{mapping}) ON DUPLICATE KEY UPDATE    `mapping`=#{mapping} " )
    void setPMConf(@Param("mid") long mid, @Param("key") String key, @Param("mapping") int mapping);

    //获取项目配置
    @Select("SELECT `mapping` from `360_pm_conf` where `mid`=#{mid} and `key`=#{key} limit 1;")
    public String getPMCONF(@Param("mid") Long mid ,@Param("key") String key);

}
